<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/11/2
  Time: 21:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="${pageContext.request.contextPath}/assets/images/favicon.png" type="image/png">
    <title>用户列表</title>

    <!--Begin  Page Level  CSS -->
    <link href="${pageContext.request.contextPath}/assets/plugins/morris-chart/morris.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet"/>
    <!--End  Page Level  CSS -->
    <link href="${pageContext.request.contextPath}/assets/css/icons.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/style.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/responsive.css" rel="stylesheet">
    <style>
        .selectC {
            display: inline-block;
            border-top-left-radius: .3rem;
            padding: .67rem 1.5rem;
            font-size: 1.25rem;
            margin-left: -1px;
            line-height: 1.25;
            background-color: #fff;
            border: 1px solid #dee2e6;
            border-bottom-left-radius: .3rem
        }

        .selectC:focus {
            outline: 0;
            box-shadow: 0 0 0 .0rem rgba(0, 123, 255, .25)
        }

        .main-content {
            background-color: rgb(236, 236, 237);
        }


        tr td a {
            margin-right: 10px;
        }

        .container-fluid {
            background-color: white;
        }

        .container .table thead tr th {
            line-height: 60px;
            text-align: center;
        }

        .container .table tbody tr td {
            line-height: 60px;
        }

        .btn {
            border-radius: 5px;
        }

        .toPage {
            display: inline-block;
            font-size: 1.25rem;
            height: 34px;
            margin-left: -1px;
            line-height: 1.25;
            border: 1px solid #dee2e6;
            width: 34px;
            text-align: center;
        }

        .toPage[type=text]:focus {
            outline: 0;
            box-shadow: 0 0 0 .0rem rgba(0, 123, 255, .25)
        }
    </style>
</head>

<body class="sticky-header">

<jsp:include page="../inc/left.jsp"/>

<div class="main-content">
    <jsp:include page="../inc/header.jsp"/>

    <div class="header-section">

        <a class="toggle-btn"><i class="fa fa-bars"></i></a>

        <form class="searchform">
            <input type="text" class="form-control" name="keyword" placeholder="Search here..."/>
        </form>

        <!--notification menu start -->
        <div class="menu-right">
            <ul class="notification-menu">
                <li>
                    <a href="#" class="btn btn-default dropdown-toggle info-number" data-toggle="dropdown">
                        <i class="fa fa-tasks"></i>
                        <span class="badge">8</span>
                    </a>
                    <div class="dropdown-menu dropdown-menu-head pull-right">
                        <h5 class="title">You have 8 pending task</h5>
                        <ul class="dropdown-list">
                            <li class="notification-scroll-list notification-list ">
                                <!-- list item-->
                                <a href="javascript:void(0);" class="list-group-item">
                                    <div class="media">
                                        <div class="pull-left p-r-10">
                                            <em class="fa  fa-shopping-cart noti-primary"></em>
                                        </div>
                                        <div class="media-body">
                                            <h5 class="media-heading">A new order has been placed.</h5>
                                            <p class="m-0">
                                                <small>29 min ago</small>
                                            </p>
                                        </div>
                                    </div>
                                </a>

                                <!-- list item-->
                                <a href="javascript:void(0);" class="list-group-item">
                                    <div class="media">
                                        <div class="pull-left p-r-10">
                                            <em class="fa fa-check noti-success"></em>
                                        </div>
                                        <div class="media-body">
                                            <h5 class="media-heading">Databse backup is complete</h5>
                                            <p class="m-0">
                                                <small>12 min ago</small>
                                            </p>
                                        </div>
                                    </div>
                                </a>

                                <!-- list item-->
                                <a href="javascript:void(0);" class="list-group-item">
                                    <div class="media">
                                        <div class="pull-left p-r-10">
                                            <em class="fa fa-user-plus noti-info"></em>
                                        </div>
                                        <div class="media-body">
                                            <h5 class="media-heading">New user registered</h5>
                                            <p class="m-0">
                                                <small>17 min ago</small>
                                            </p>
                                        </div>
                                    </div>
                                </a>

                                <!-- list item-->
                                <a href="javascript:void(0);" class="list-group-item">
                                    <div class="media">
                                        <div class="pull-left p-r-10">
                                            <em class="fa fa-diamond noti-danger"></em>
                                        </div>
                                        <div class="media-body">
                                            <h5 class="media-heading">Database error.</h5>
                                            <p class="m-0">
                                                <small>11 min ago</small>
                                            </p>
                                        </div>
                                    </div>
                                </a>

                                <!-- list item-->
                                <a href="javascript:void(0);" class="list-group-item">
                                    <div class="media">
                                        <div class="pull-left p-r-10">
                                            <em class="fa fa-cog noti-warning"></em>
                                        </div>
                                        <div class="media-body">
                                            <h5 class="media-heading">New settings</h5>
                                            <p class="m-0">
                                                <small>18 min ago</small>
                                            </p>
                                        </div>
                                    </div>
                                </a>
                            </li>
                            <li class="last"><a href="#">View all notifications</a></li>
                        </ul>
                    </div>
                </li>

                <li>
                    <a href="#" class="btn btn-default dropdown-toggle info-number" data-toggle="dropdown">
                        <i class="fa fa-bell-o"></i>
                        <span class="badge">4</span>
                    </a>
                    <div class="dropdown-menu dropdown-menu-head pull-right">
                        <h5 class="title">Notifications</h5>
                        <ul class="dropdown-list normal-list">
                            <li class="message-list message-scroll-list">
                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-8.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">15 minutes ago</span>
                                </a>

                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-7.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">10 minutes ago</span>
                                </a>

                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-6.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">20 minutes ago</span>
                                </a>

                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-6.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">20 minutes ago</span>
                                </a>

                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-6.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">20 minutes ago</span>
                                </a>

                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-6.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">20 minutes ago</span>
                                </a>
                            </li>
                            <li class="last"><a href="#">All Messages</a></li>
                        </ul>
                    </div>
                </li>
                <li>
                    <a href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        <img src="${pageContext.request.contextPath}/assets/images/users/avatar-6.jpg" alt=""/>
                        John Doe
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-usermenu pull-right">
                        <li><a href="#"> <i class="fa fa-wrench"></i> Settings </a></li>
                        <li><a href="#"> <i class="fa fa-user"></i> Profile </a></li>
                        <li><a href="#"> <i class="fa fa-info"></i> Help </a></li>
                        <li><a href="#"> <i class="fa fa-lock"></i> Logout </a></li>
                    </ul>
                </li>

            </ul>
        </div>
        <!--notification menu end -->

    </div>

    <div class="wrapper">

        <div class="page-title-box">
            <h4 class="page-title">退货原因设置</h4>
            <ol class="breadcrumb">
                <li>
                    <a href="#">首页</a>
                </li>
                <li>
                    <a href="#">订单</a>
                </li>
                <li class="active">
                    退货原因设置
                </li>
            </ol>
            <div class="clearfix"></div>
        </div>

        <div class="container-fluid"
             style="margin-top: 50px;margin-bottom: 20px;  border:solid 1px rgba(0,0,0,0.2);padding: 20px">
            数据列表
            <button class="mybtn  btn btn-info" style="margin-left: 1150px"><a href="returnReasonListAdd">添加</a>
            </button>
        </div>


        <div class="container-fluid">
            <table class="table table-hover table-bordered" style="font-size: 15px">
                <thead>
                <tr>
                    <th>编号</th>
                    <th>原因类型</th>
                    <th>排序</th>
                    <th>是否可用</th>
                    <th>添加时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody style="text-align: center">
                <c:forEach items="${orderReturnReasonList}" var="a">
                    <tr>
                        <td>${a.id}</td>
                        <td>${a.name}</td>
                        <td>${a.sort}</td>
                        <td>${a.status}</td>
                        <td><fmt:formatDate value="${a.createTime}" pattern="yyyy-MM-dd hh:mm:ss"/></td>
                        <td>
                            <button class="btn-danger"><a class="btn-danger"
                                                          href="${pageContext.request.contextPath}/order/returnReasonListUpdate/${a.id}">编辑</a>
                            </button>
                            <button class="btn-info" onclick="deletes(${a.id})" class="deletes">删除</button>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
        <nav aria-label="...">
            <ul class="pagination">
                <span id="current" hidden>${pageInfo.page}</span>
                <span id="currentLimit" hidden>${pageInfo.limit}</span>
                <li class="page-item disabled" style="border-color:white">
                    <span class="page-link" href="${pageContext.request.contextPath}/#">共${pageInfo.count}条数据</span>
                </li>
                <li style="float: left" class="page-item">
                    <select id="select_limit" name="limit" class="selectC">
                        <option value="10" ${pageInfo.limit==10?"selected":""}>10条/页</option>
                        <option value="12" ${pageInfo.limit==12?"selected":""}>12条/页</option>
                        <option value="14" ${pageInfo.limit==14?"selected":""}>14条/页</option>
                        <option value="16" ${pageInfo.limit==16?"selected":""}>16条/页</option>
                    </select>
                </li>
                <li class="page-item ${pageInfo.page==1?"disabled":""}">
                    <a class="page-link "${pageInfo.page==1?"href=''":""}
                       href="${pageContext.request.contextPath}/permissions/role?page=${pageInfo.page-1}&limit=${pageInfo.limit}&search=${param.search!=null?param.search:""}">上一页</a>
                </li>
                <li class="page-item ${pageInfo.page==1?"active":""}">
                    <a class="page-link"
                       href="${pageContext.request.contextPath}/permissions/role?page=1&limit=${pageInfo.limit}&search=${param.search!=null?param.search:""}">1</a>
                </li>

                <c:if test="${pageInfo.page>2}">
                    <li class="page-item disabled">
                        <span class="page-link">...</span>
                    </li>
                </c:if>

                <c:if test="${pageInfo.page>1&&pageInfo.page<pageInfo.cntpage}">
                    <li class="page-item ${(pageInfo.page>1&&pageInfo.page<pageInfo.cntpage)?"active":""}">
                        <span class="page-link">${pageInfo.page}</span>
                    </li>
                </c:if>

                <c:if test="${pageInfo.page<pageInfo.cntpage-1}">
                    <li class="page-item disabled ">
                        <span class="page-link">...</span>
                    </li>
                </c:if>

                <c:if test="${pageInfo.cntpage>1}">
                    <li class="page-item ${pageInfo.page==pageInfo.cntpage?"active":""}">
                        <a id="cntpage" class="page-link "
                           href="${pageContext.request.contextPath}/permissions/role?page=${pageInfo.cntpage}&limit=${pageInfo.limit}&search=${param.search!=null?param.search:""}">${pageInfo.cntpage}</a>
                    </li>
                </c:if>
                <li class="page-item  ${pageInfo.page==pageInfo.cntpage?"disabled":""}">
                    <a class="page-link" ${pageInfo.page==pageInfo.cntpage?"href='#'":""}
                       href="${pageContext.request.contextPath}/permissions/role?page=${pageInfo.page+1}&limit=${pageInfo.limit}&search=${param.search!=null?param.search:""}">下一页</a>
                </li>
                <li class="page-item">
                    <span class="disabled" style="cursor: pointer" tabindex="1" onclick="toPage()">前往</span>
                    <input id="page" type="text" class="toPage" style="float:left;">
                    <span class="disabled">页</span>
                </li>

            </ul>
        </nav>
    </div>
</div>

<script>

    function updateHidden(id, hidden) {
        location.href = "${pageContext.request.contextPath}/order/returnReasonListUpdate/" + id;
    }

    function deletes(id) {
        layer.confirm('您确定删除吗?', {
            btn: ['确定', '取消'],
            title: '提示',
        }, function () {
            location.href = "${pageContext.request.contextPath}/order/returnReasonListDelete/" + id;
        }, function () {
            window.onload;
        });
    }

</script>

<!--Begin core plugin -->
<script src="${pageContext.request.contextPath}/assets/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/plugins/moment/moment.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/jquery.slimscroll.js "></script>
<script src="${pageContext.request.contextPath}/assets/js/jquery.nicescroll.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/functions.js"></script>
<script src="${pageContext.request.contextPath}/assets/layui/layui.js"></script>
<!-- End core plugin -->

<!--Begin Page Level Plugin-->
<script src="${pageContext.request.contextPath}/assets/plugins/morris-chart/morris.js"></script>
<script src="${pageContext.request.contextPath}/assets/plugins/morris-chart/raphael-min.js"></script>
<script src="${pageContext.request.contextPath}/assets/plugins/jquery-sparkline/jquery.charts-sparkline.js"></script>
<script src="${pageContext.request.contextPath}/assets/pages/dashboard.js"></script>
<!--End Page Level Plugin-->


</body>
</html>
